$OpenBSD: patch-src_xercesc_Makefile_incl,v 1.1.1.1 2008/10/26 23:15:17 ajacoutot Exp $
--- src/xercesc/Makefile.incl.orig	Thu Aug 30 14:10:20 2007
+++ src/xercesc/Makefile.incl	Sun Oct 26 23:02:51 2008
@@ -627,6 +627,30 @@ ifeq (${PLATFORM}, NETBSD)
   LD_SODEPDOM = -Wl,-soname,${SO_DEPDOM}
 endif
 
+#=============== OPENBSD SPECIFIC OPTIONS =========================
+ifeq (${PLATFORM}, OPENBSD)
+  PLATFORM_COMPILE_OPTIONS = -D${PLATFORM}
+
+  ifeq (${LIBTYPE},shared)
+    PLATFORM_COMPILE_OPTIONS += -fPIC
+    MAKE_SHARED = ${CXX} -D${PLATFORM} -shared -fPIC ${LDFLAGS}
+    MAKE_SHARED_C = ${CC} -D${PLATFORM} -shared -fPIC ${LDFLAGS}
+  endif
+
+  ifeq (${TRANSCODER}, ICU)
+    PLATFORM_COMPILE_OPTIONS += -I${LOCALBASE}/include
+    ALLLIBS = ${LIBS} -L${LOCALBASE}/lib -L${ICUROOT} -licuuc -licudata
+  else
+    ALLLIBS = ${LIBS}
+  endif
+
+  SHLIBSUFFIX=.so
+  ICUSHLIBSUFFIX=.so
+  ## Compiler switch to embed a library name
+  LD_SONAME = -Wl,-soname,${SO_NAME}
+  LD_SODEPDOM = -Wl,-soname,${SO_DEPDOM}
+endif
+
 #=============== IRIX SPECIFIC OPTIONS ============================
 ifeq (${PLATFORM}, IRIX)
   PLATFORM_COMPILE_OPTIONS = -LANG:pch -LANG:std -O2 \
@@ -1084,6 +1108,23 @@ ifeq (${PLATFORM}, QNX)
     LINK_DEPDOM=${LIBDEPDOM}${SHLIBSUFFIX}
     SO_DEPDOM  =${LIBDEPDOM}${SHLIBSUFFIX}.${SO_TARGET_VERSION}
     REAL_DEPDOM=$(SO_DEPDOM)
+
+endif
+ifeq (${PLATFORM}, OPENBSD)
+    #
+    # LINK_NAME=SO_NAME=REAL_NAME=libxerces-c.{suffix}
+    #
+    LINK_NAME=${LIBNAME}${SHLIBSUFFIX}.${SO_TARGET_VERSION}.${SO_TARGET_VERSION_MAJOR}
+    SO_NAME  =${LIBNAME}${SHLIBSUFFIX}.${SO_TARGET_VERSION}.${SO_TARGET_VERSION_MAJOR}
+    REAL_NAME=${LIBNAME}${SHLIBSUFFIX}.${SO_TARGET_VERSION}.${SO_TARGET_VERSION_MAJOR}
+
+    LINK_DEPDOM=${LIBDEPDOM}${SHLIBSUFFIX}.${SO_TARGET_VERSION}.${SO_TARGET_VERSION_MAJOR}
+    SO_DEPDOM  =${LIBDEPDOM}${SHLIBSUFFIX}.${SO_TARGET_VERSION}.${SO_TARGET_VERSION_MAJOR}
+    REAL_DEPDOM=${LIBDEPDOM}${SHLIBSUFFIX}.${SO_TARGET_VERSION}.${SO_TARGET_VERSION_MAJOR}
+
+    RESLIB_LINK_NAME=${RESLIBNAME}${SHLIBSUFFIX}.${SO_TARGET_VERSION}.${SO_TARGET_VERSION_MAJOR}
+    RESLIB_SO_NAME  =${RESLIBNAME}${SHLIBSUFFIX}.${SO_TARGET_VERSION}.${SO_TARGET_VERSION_MAJOR}
+    RESLIB_REAL_NAME=${RESLIBNAME}${SHLIBSUFFIX}.${SO_TARGET_VERSION}.${SO_TARGET_VERSION_MAJOR}
 
 endif
 
